import React, { PureComponent } from 'react';
import { TabBar, Icon } from 'antd-mobile';
import { nav_bottom_bar, nav_bottom_bar_X, cart_link_s } from './NavBottomBar.less';
import { connect } from 'dva';
import { routerRedux } from 'dva/router';
import cartsvg from '../../assets/svg/cart.svg';
import cartsvg1 from '../../assets/svg/goodsCart.svg';
import cartselectsvg from '../../assets/svg/cart_sselect.svg';
//import  loading from 'antd-mobile/lib/svg/loading.svg';

import equi from '../../utils/judgmentEquipment';


class TimeBuyBottomBar extends PureComponent {


    componentDidMount() {
    }

    render() {
        const { path, dispatch } = this.props;

        return (
            <div style={{zIndex:"11111111"}} className={equi() ? nav_bottom_bar_X : nav_bottom_bar}>
                <TabBar
                    unselectedTintColor="#949494"
                    tintColor="red"
                    barTintColor="white"
                    hidden={false}
                >
                    <TabBar.Item
                        title="全部抢购"
                        key="Life"
                        icon={<div className="quanbuqianggou_link" />}
                        selectedIcon={<div className="quanbuqianggou_select_link" />}
                        selected={path === "/timeBuy"}
                        // badge={1}
                        onPress={() => {
                            dispatch(routerRedux.push({
                                pathname: '/timeBuy/1',
                            }));
                        }}
                        data-seed="logId"
                    />
                    <TabBar.Item
                        icon={<div className="qianggouClass_link" />}
                        selectedIcon={<div className="qianggouClass_select_link" />}
                        title="抢购分类"
                        key="Koubei"
                        // badge={'new'}
                        selected={path === '/timeBuyClass'}
                        onPress={() => {
                            dispatch(routerRedux.push({
                                pathname: '/timeBuyClass',
                            }));
                        }}
                        data-seed="logId1"
                    />
                    <TabBar.Item
                        icon={<div className="tixing_link" />}
                        selectedIcon={<div className="tixing_select_link" />}
                        title="提醒"
                        key="Friend"
                        // dot
                        selected={path === '/timeBuyRemind'}
                        onPress={() => {
                            dispatch(routerRedux.push({
                                pathname: '/timeBuyRemind',
                            }));
                        }}
                    />
                </TabBar>
            </div>

        );
    }
}

export default connect(({ app }) => ({ app }))(TimeBuyBottomBar);

/*
 * 限时抢购底部导航
 * */